﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Contests.master" AutoEventWireup="false" CodeFile="ContestList.aspx.vb" Inherits="ContestList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <fieldset>
   <legend>Contest-Tags</legend>
       <asp:GridView ID="DGContest" runat="server" DataSourceID="DSContests">
       </asp:GridView>
    <asp:SqlDataSource ID="DSContests" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        SelectCommand="SELECT DISTINCT [Title], [Details], [Category] FROM [QContestTag] WHERE ([Tag] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="Tag" QueryStringField="ID" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    </fieldset>
    <fieldset>
    <legend>Contest Listing</legend>
        <asp:GridView ID="DGContestList" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="DSContestList">
            <Columns>
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="ContestDetails.aspx?ID={0}" HeaderText="Details" 
                    Text="More..." />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="DSContestList" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
            ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
            SelectCommand="SELECT * FROM [QContestList]"></asp:SqlDataSource>
    </fieldset>
</asp:Content>

